<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改用工统计')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-ygtj-edit" th:object="${gcYgtj}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-2 control-label">年：</label>
                <div class="col-sm-4">
                    <input name="year" th:field="*{year}" class="form-control" type="text" readonly="readonly">
                </div>
                <label class="col-sm-2 control-label">月：</label>
                <div class="col-sm-4">
                    <input name="month" th:field="*{month}" class="form-control" type="text" readonly="readonly">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-2 control-label">日：</label>
                <div class="col-sm-4">
                    <input name="day" th:field="*{day}" class="form-control" type="text" readonly="readonly">
                </div>
                <label class="col-sm-2 control-label">班组：</label>
                <div class="col-sm-4">
                    <input name="banz" th:field="*{banz}" class="form-control" type="text" readonly="readonly">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-2 control-label">带班：</label>
                <div class="col-sm-4">
                    <input name="daib" th:field="*{daib}" class="form-control" type="text" readonly="readonly">
                </div>
                <label class="col-sm-2 control-label">编码：</label>
                <div class="col-sm-4">
                    <input name="code" th:field="*{code}" class="form-control" type="text" readonly="readonly">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-2 control-label">工程名称：</label>
                <div class="col-sm-4">
                    <input name="projectName" th:field="*{projectName}" class="form-control" type="text" readonly="readonly">
                </div>
                <label class="col-sm-2 control-label">假/车：</label>
                <div class="col-sm-4">
                    <input name="jc" th:field="*{jc}" class="form-control" type="text" readonly="readonly">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-2 control-label">出工人员：</label>
                <div class="col-sm-4">
                    <input name="peopleName" th:field="*{peopleName}" class="form-control" type="text" readonly="readonly">
                </div>
                <label class="col-sm-2 control-label">出工情况：</label>
                <div class="col-sm-4">
                    <input name="descs" th:field="*{descs}" class="form-control" type="text" readonly="readonly">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-2 control-label">日薪：</label>
                <div class="col-sm-4">
                    <input name="rx" th:field="*{rx}" class="form-control" type="text" readonly="readonly">
                </div>
                <label class="col-sm-2 control-label">结账金额：</label>
                <div class="col-sm-4">
                    <input name="jzje" th:field="*{jzje}" class="form-control" type="text" readonly="readonly">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-2 control-label is-required">结款人姓名：</label>
                <div class="col-sm-4">
                    <input name="jkrName" th:field="*{jkrName}" class="form-control" type="text" required>
                </div>
                <label class="col-sm-2 control-label is-required">结账日期：</label>
                <div class="col-sm-4">
                    <div class="input-group date">
                        <input name="jzrq" required th:value="${#dates.format(gcYgtj.jzrq, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">备注：</label>
                <div class="col-sm-10">
                    <textarea name="memo" class="form-control">[[*{memo}]]</textarea>
                </div>
            </div>
        </form>
    </div>
    
    <div class="row">
        <div class="col-sm-offset-5 col-sm-10">
            <button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>保 存</button>&nbsp;
            <button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭 </button>
        </div>
    </div>
    
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "gcgl/ygtj";
        $("#form-ygtj-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.saveTab(prefix + "/edit", $('#form-ygtj-edit').serialize());
            }
        }

        $("input[name='jzrq']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

    </script>
</body>
</html>